<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>圆的周长和面积</title>
	</head>
	<body>
		
		
	圆的半径：<input type="text" placeholder="半径" id="a" />
	圆的周长：<input type="text" placeholder="周长" id="b"/>
	圆的面积：<input type="text" placeholder="面积" id="c"/>
		
		
		
		
		<script src="js/script.js" type="text/javascript" charset="utf-8"></script>
		<script>
			var p =Math.PI;
			var num = prompt("圆的半径")
			num = parseInt(num)
			 var c =2*p*num
			 var s =p*num*num
			document.querySelector("#a").value =num 
			document.querySelector("#b").value = c
			document.querySelector("#c").value = s
		</script>
	</body>
</html>
